Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate jest and spectron #28

Closed

Conversation

SerhatKayaa
Copy link

You can read more via this link
https://circleci.com/blog/electron-testing/
if you test your code, just use npm run test
i left you an example in the test

@acrosman
Copy link
Owner

acrosman commented Oct 3, 2020

@SerhatKayaa thank you for doing this fix for #27. Could you also include an update to the package.json to add the new dev dependencies of Jest and Spectron as well? I can resolve any issues that come up around the package-lock.json in my own commit (those get ugly in PRs). Also please include a newline at the end of the new test file.

@acrosman
Copy link
Owner

acrosman commented Oct 5, 2020

Thank you for continuing to work on this. Looks like this draft now moves several of the app files into a src directory. Can you either explain that choice or revise again to undo that part of the changes.

@SerhatKayaa
Copy link
Author

Sorry for late response, Main src folder is general approach in javascript world. I think you should seperate your folder in src directory.I tried that i change the jest rootDirectory then i get an error without src folder, I'll share you two different electron app, you can look at that project structure. Thank you
https://github.com/martpie/museeks
https://github.com/microsoft/vscode

@acrosman
Copy link
Owner

Sure, although there are plenty of electron projects that elect to use /app or /app/src. More importantly when you moved everything you didn't update any of the internal references so if you run npm start in your branch nothing works. Jest's roots directive should allow you to set the app directory. A fully project refactor is something I'm open to considering but that would be a separate issue from just enabling a testing framework.

@SerhatKayaa
Copy link
Author

I think,it's okey right now, can you check this code ?

@acrosman
Copy link
Owner

The current PR seems to delete all the main project files.

@acrosman acrosman closed this Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants